<!DOCTYPE HTML>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
	<title>Our Love Story</title>
	<meta http-equiv="content-type" content="text/html; charset=UTF-8">
	<style type="text/css">
		@font-face {
			font-family: digit;
			src: url('digital-7_mono.ttf') format("truetype");
		}
	</style>
	<link href="css/default.css" type="text/css" rel="stylesheet">
	<script type="text/javascript" src="js/jquery.js"></script>
	<script type="text/javascript" src="js/garden.js"></script>
    <script type="text/javascript" src="js/functions.js"></script>
</head>

<body>
	<div id="mainDiv">
		<div id="content">
			<div id="code">
				<span class="comments">"""</span><br />
				<span class="space"/><span class="comments">I am sorry to forget the date of Tanabata. </span><br />
				<span class="space"/><span class="comments">When I noticed it was already noon yesterday....... </span><br />
				<span class="space"/><span class="comments">and it's no time to choose a gift and send it to you </span><br />
				<span class="space"/><span class="comments">(I don't even know your current address.)  </span><br />
				<span class="space"/><span class="comments">So I learned JavaScript as much as I can,</span><br />
				<span class="space"/><span class="comments">(for 25 hours),</span><br />
				<span class="space"/><span class="comments">and completed this page by modifying on the results of a predecessor</span><br />
				<span class="space"/><span class="comments">I hope you will like it......</span><br />
				<span class="space"/><span class="comments">"""</span><br />
				<span class="keyword">import</span> LaurenceWang <span class="keyword">from</span> Boy<br /><br />
				<span class="keyword">import</span> WilliaWang <span class="keyword">from</span> Girl<br /><br />
				i = <span class="string">LaurenceWang</span>()<br /><br />
				u = <span class="string">WilliaWang</span>()<br /><br />
				<span class="comments"># June 17, 2014, That is the beginning of everything. </span><br />
				u.tell(i, <span class="string">"我喜欢你"</span>)<br /><br />
				<span class="comments"># You light up my world.</span><br />
				u.lightUp(i.world)<br /><br />
				<span class="comments"># However, you are so tender,</span><br />
				<span class="comments"># I do not know how to do to return it.</span><br />
				<span class="comments"># You gave me far more than I gave you.</span><br />
				<span class="keyword">assert</span> u.gave(i) > i.gave(u)<br /><br />
				<span class="keyword">try</span>:<br />
				<span class="placeholder"/><span class="comments"># I want to take care of you.</span><br />
				<span class="placeholder"/>i.takeCareOf(u)<br /><br />
				<span class="keyword">except</span> LackOfAbilityError as e:<br />
				<span class="placeholder"/><span class="comments"># Maybe I'm lack of ability now.</span><br />
				<span class="placeholder"/>haveAbility = false<br /><br />
				<span class="placeholder"/><span class="comments"># If so, I'll improve myself until I'm able to give you what you gave me.</span><br />
				<span class="placeholder"/><span class="keyword">while</span> <span class="keyword">not</span> haveAbility :<br />
				<span class="placeholder"/><span class="placeholder"/>i.improve()<br />
				<span class="placeholder"/><span class="placeholder"/>haveAbility = (i.ability >= u.deserve)<br /><br />
				<span class="keyword">finally</span>:<br />
				<span class="placeholder"/><span class="comments"># When I can take care of you, the moment comes.</span><br /><br />
				<span class="placeholder"/>i.marry(u)<br /><br />
				<span class="placeholder"/>i.liveHappilyWith(u)<br />
			</div>
			<div id="loveHeart">
				<canvas id="garden"></canvas>
				<div id="words">
					<div id="messages">
						WeiYu, I have fallen in love with you for
						<div id="elapseClock"></div>
					</div>
					<div id="loveu">
						It will reach 36525 one day.<br />
						<div class="signature">- RuiJie</div>
					</div>
				</div>
			</div>
		</div>
		<div id="copyright">
			Emmmmm......I'm afraid I have to finish my Python project first these days, <br />
			I'll begin to learn JavaScript and rewrite this page at 2018.9.3.<br />
			The next two lines are the information about the "predecessor" mentioned earlier.<br />
			Inspired by <a href="http://www.openrise.com/lab/FlowerPower/">FlowerPower</a> project.<br />
			Copyright © 2011 <a href='http://hackerzhou.me'>hackerzhou.me</a> 2009-2011
		</div>
	</div>
	<script type="text/javascript">
		var offsetX = $("#loveHeart").width() / 2;
		var offsetY = $("#loveHeart").height() / 2 - 55;
		var together = new Date();
		together.setFullYear(2014, 6, 17);
		together.setHours(14);
		together.setMinutes(0);
		together.setSeconds(0);
		together.setMilliseconds(0);
		
		if (!document.createElement('canvas').getContext) {
			var msg = document.createElement("div");
			msg.id = "errorMsg";
			msg.innerHTML = "Your browser doesn't support HTML5!<br/>Recommend use Chrome 14+/IE 9+/Firefox 7+/Safari 4+"; 
			document.body.appendChild(msg);
			$("#code").css("display", "none")
			$("#copyright").css("position", "absolute");
			$("#copyright").css("bottom", "10px");
		    document.execCommand("stop");
		} else {
			setTimeout(function () {
				startHeartAnimation();
			}, 5000);

			timeElapse(together);
			setInterval(function () {
				timeElapse(together);
			}, 500);

			adjustCodePosition();
			$("#code").typewriter();
		}
	</script>
</body>
</html>
